#ifndef __OSAL_DEBUG_H
#define __OSAL_DEBUG_H

#define DEBUG_ON
#define DEBUG_TIMER_ON
#define DEBUG_HAL_ON
#define DEBUG_USB_ON

#ifdef DEBUG_ON
#define  OSAL_DEBUG(fmt, arg...)    printf(fmt, ##arg)
#else
#define  OSAL_DEBUG(fmt, arg...)
#endif

#define  OSAL_DEBUG_X(fmt, mod, arg...)    OSAL_DEBUG("[%s]:"fmt, mod, ##arg)


#ifdef DEBUG_USB_ON
#define DEBUG_USB(fmt, arg...)  OSAL_DEBUG_X(fmt, "USB", ##arg)
#else
#define DEBUG_USB(fmt, arg...)
#endif

#ifdef DEBUG_TIMER_ON
#define DEBUG_TIMER(fmt, arg...)  OSAL_DEBUG_X(fmt, "TIMER", ##arg)
#else
#define DEBUG_TIMER(fmt, arg...)
#endif

#ifdef DEBUG_HAL_ON
#define DEBUG_HAL(fmt, arg...)  OSAL_DEBUG_X(fmt, "HAL", ##arg)
#else
#define DEBUG_HAL(fmt, arg...) 
#endif


#endif